<!--
 * @Author: 高瑞寒 15932717091@163.com
 * @Date: 2022-05-17 22:48:58
 * @LastEditTime: 2022-05-20 21:53:39
 * @LastEditors: 高瑞寒 15932717091@163.com
 * @Description:
-->
<template>
  <el-dropdown trigger="click" v-bind="$attrs" @command="handleSelectColor" id="guide-theme">
    <span class="el-dropdown-link">
      <el-tooltip
        effect="dark"
        :content="$t('navBar.themeChange')"
        placement="bottom"
      >
      <div>
        <svg-icon icon="change-theme"></svg-icon>
      </div>
      </el-tooltip>
    </span>
    <template #dropdown>
      <el-dropdown-menu>
        <el-dropdown-item> {{ $t('theme.themeColorChange') }}</el-dropdown-item>
      </el-dropdown-menu>
    </template>
  </el-dropdown>
  <color-select v-model:modelValue="colorSelectVisible"></color-select>
</template>

<script setup>
import { ref } from 'vue'
import ColorSelect from './components/ColorSelect.vue'
import { useStore } from 'vuex'
const store = useStore()
const colorSelectVisible = ref(false)
const handleSelectColor = () => {
  colorSelectVisible.value = true
  console.log(store.getters.cssVar)
}
</script>

<style scoped>
</style>
